.class Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage;
.super Ljava/lang/Thread;
.source "ShareToMicroBlog.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/netease/newsreader/activity/ShareToMicroBlog;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = "postEditMessage"
.end annotation


# instance fields
.field final synthetic this$0:Lcom/netease/newsreader/activity/ShareToMicroBlog;


# direct methods
.method constructor <init>(Lcom/netease/newsreader/activity/ShareToMicroBlog;)V
    .locals 0
    .parameter

    .prologue
    .line 694
    iput-object p1, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage;->this$0:Lcom/netease/newsreader/activity/ShareToMicroBlog;

    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 11

    .prologue
    const/4 v10, 0x1

    .line 699
    new-instance v4, Landroid/os/Message;

    invoke-direct {v4}, Landroid/os/Message;-><init>()V

    .line 700
    .local v4, msg:Landroid/os/Message;
    iput v10, v4, Landroid/os/Message;->what:I

    .line 703
    :try_start_0
    new-instance v1, Lorg/apache/http/client/methods/HttpPost;

    const-string v7, "http://api.t.163.com/statuses/update.json"

    invoke-direct {v1, v7}, Lorg/apache/http/client/methods/HttpPost;-><init>(Ljava/lang/String;)V

    .line 705
    .local v1, httpRequest:Lorg/apache/http/client/methods/HttpPost;
    new-instance v5, Ljava/util/ArrayList;

    invoke-direct {v5}, Ljava/util/ArrayList;-><init>()V

    .line 706
    .local v5, params:Ljava/util/List;,"Ljava/util/List<Lorg/apache/http/NameValuePair;>;"
    new-instance v7, Lorg/apache/http/message/BasicNameValuePair;

    const-string v8, "status"

    iget-object v9, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage;->this$0:Lcom/netease/newsreader/activity/ShareToMicroBlog;

    invoke-static {v9}, Lcom/netease/newsreader/activity/ShareToMicroBlog;->access$3(Lcom/netease/newsreader/activity/ShareToMicroBlog;)Ljava/lang/String;

    move-result-object v9

    invoke-direct {v7, v8, v9}, Lorg/apache/http/message/BasicNameValuePair;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    invoke-interface {v5, v7}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 708
    new-instance v7, Lorg/apache/http/message/BasicNameValuePair;

    const-string v8, "source"

    const-string v9, "<a href=\"http://m.163.com/newsapp/\">\u7f51\u6613Android\u65b0\u95fb\u5ba2\u6237\u7aef</a>"

    invoke-direct {v7, v8, v9}, Lorg/apache/http/message/BasicNameValuePair;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    invoke-interface {v5, v7}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 709
    const-string v7, "Cookie"

    iget-object v8, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage;->this$0:Lcom/netease/newsreader/activity/ShareToMicroBlog;

    invoke-static {v8}, Lcom/netease/newsreader/activity/ShareToMicroBlog;->access$20(Lcom/netease/newsreader/activity/ShareToMicroBlog;)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v1, v7, v8}, Lorg/apache/http/client/methods/HttpPost;->addHeader(Ljava/lang/String;Ljava/lang/String;)V

    .line 711
    new-instance v7, Lorg/apache/http/client/entity/UrlEncodedFormEntity;

    const-string v8, "UTF-8"

    invoke-direct {v7, v5, v8}, Lorg/apache/http/client/entity/UrlEncodedFormEntity;-><init>(Ljava/util/List;Ljava/lang/String;)V

    invoke-virtual {v1, v7}, Lorg/apache/http/client/methods/HttpPost;->setEntity(Lorg/apache/http/HttpEntity;)V

    .line 713
    new-instance v3, Lorg/apache/http/impl/client/DefaultHttpClient;

    invoke-direct {v3}, Lorg/apache/http/impl/client/DefaultHttpClient;-><init>()V

    .line 714
    .local v3, httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    iget-object v7, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage;->this$0:Lcom/netease/newsreader/activity/ShareToMicroBlog;

    invoke-static {v7}, Lcom/netease/newsreader/util/Tools;->isCMWAPMobileNet(Landroid/content/Context;)Z

    move-result v7

    if-eqz v7, :cond_0

    .line 715
    new-instance v6, Lorg/apache/http/HttpHost;

    const-string v7, "10.0.0.172"

    const/16 v8, 0x50

    const-string v9, "http"

    invoke-direct {v6, v7, v8, v9}, Lorg/apache/http/HttpHost;-><init>(Ljava/lang/String;ILjava/lang/String;)V

    .line 716
    .local v6, proxy:Lorg/apache/http/HttpHost;
    invoke-virtual {v3}, Lorg/apache/http/impl/client/DefaultHttpClient;->getParams()Lorg/apache/http/params/HttpParams;

    move-result-object v7

    const-string v8, "http.route.default-proxy"

    invoke-interface {v7, v8, v6}, Lorg/apache/http/params/HttpParams;->setParameter(Ljava/lang/String;Ljava/lang/Object;)Lorg/apache/http/params/HttpParams;

    .line 718
    .end local v6           #proxy:Lorg/apache/http/HttpHost;
    :cond_0
    invoke-virtual {v3, v1}, Lorg/apache/http/impl/client/DefaultHttpClient;->execute(Lorg/apache/http/client/methods/HttpUriRequest;)Lorg/apache/http/HttpResponse;

    move-result-object v2

    .line 719
    .local v2, httpResponse:Lorg/apache/http/HttpResponse;
    const/4 v7, 0x0

    iput v7, v4, Landroid/os/Message;->arg1:I
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 725
    .end local v1           #httpRequest:Lorg/apache/http/client/methods/HttpPost;
    .end local v2           #httpResponse:Lorg/apache/http/HttpResponse;
    .end local v3           #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    .end local v5           #params:Ljava/util/List;,"Ljava/util/List<Lorg/apache/http/NameValuePair;>;"
    :goto_0
    iget-object v7, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage;->this$0:Lcom/netease/newsreader/activity/ShareToMicroBlog;

    iget-object v7, v7, Lcom/netease/newsreader/activity/ShareToMicroBlog;->reflashormoreDataHandler:Landroid/os/Handler;

    invoke-virtual {v7, v4}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    .line 726
    return-void

    .line 721
    :catch_0
    move-exception v0

    .line 722
    .local v0, ex:Ljava/lang/Exception;
    iput v10, v4, Landroid/os/Message;->arg1:I

    goto :goto_0
.end method
